Document extraction: four main approaches with a 1000x cost difference
I went down a rabbit hole comparing four ways to turn unstructured documents into structured data: full LLM inference, fine-tuned small models, template-based extraction, and cloud OCR. The cost spread floored me. A template reads a document for about $0.001, where full LLM inference runs $5 to $15 on the same PDF and the same fields. Most teams pay LLM prices for forms a regex could handle. Classify each document upfront, route it to the cheapest tool that can do the job, and you cut costs 85% while keeping the big model in reserve for the genuinely weird formats.